from __future__ import annotations

from dataclasses import dataclass


@dataclass
class GuySystem:
    guy_tension_kN: float
    anchor_required_kN: float
    note: str


def design_guy_anchor(top_shear_kN: float, num_guys: int = 4, safety_factor: float = 2.0) -> GuySystem:
    """跨越架拉线与地锚：将顶端剪力分配至拉线并乘以安全系数。"""

    T = top_shear_kN / max(1, num_guys)
    anchor = T * safety_factor
    return GuySystem(guy_tension_kN=T, anchor_required_kN=anchor, note="需考虑入土与角度分力")


